package com.huawei.appmarket.service.infoflow.card;

import android.content.Context;
import androidx.databinding.ViewDataBinding;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.infoflow.bean.InfoFlowBannerCardBean;
import com.huawei.appmarket.service.infoflow.cards.card.BaseInfoFlowCard;
import huawei.widget.HwTextView;
import o.dof;
import o.epv;
import o.eqx;
import o.ewr;

public class InfoFlowBannerCard extends BaseInfoFlowCard<ewr> {
    public /* synthetic */ void ˊ(ViewDataBinding viewDataBinding) {
        ॱ((ewr) viewDataBinding);
    }

    public InfoFlowBannerCard(Context context) {
        super(context);
    }

    public void ॱ(ewr o_ewr) {
        super.ˊ(o_ewr);
        int ʼ = (int) (((float) this.ˋ) * epv.ʼ());
        ((ewr) ʾ()).ˋ.getLayoutParams().height = ʼ;
        ((ewr) ʾ()).ˏ.getLayoutParams().height = ʼ;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof InfoFlowBannerCardBean) {
            int i;
            InfoFlowBannerCardBean infoFlowBannerCardBean = (InfoFlowBannerCardBean) cardBean;
            eqx.ˏ(((ewr) ʾ()).ˋ, infoFlowBannerCardBean.ˊ(), "image_default_icon");
            if (dof.ˋ(infoFlowBannerCardBean.ॱ())) {
                ((ewr) ʾ()).ˏ.setVisibility(4);
            } else {
                eqx.ˎ(((ewr) ʾ()).ˏ, infoFlowBannerCardBean.ॱ());
                ((ewr) ʾ()).ˏ.setVisibility(0);
            }
            ((ewr) ʾ()).ʻ.setText(infoFlowBannerCardBean.ʽ());
            HwTextView hwTextView = ((ewr) ʾ()).ॱ;
            if (dof.ˋ(infoFlowBannerCardBean.ꜟ())) {
                i = 8;
            } else {
                i = 0;
            }
            hwTextView.setVisibility(i);
            ((ewr) ʾ()).ॱ.setText(infoFlowBannerCardBean.ꜟ());
        }
    }
}
